package com.slz3.business.module.wmsManagement.wmsWarehouseManage.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsWarehouseManage.domain.WmsWarehouseManage;
import com.slz3.business.module.wmsManagement.wmsWarehouseManage.domain.WmsWarehouseManageCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsWarehouseManageResController extends WmsWarehouseManageResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, WmsWarehouseManage wmsWarehouseManage) {
        if (WmsWarehouseManageResUnsafeValid.add(req, wmsWarehouseManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManage);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        if (WmsWarehouseManageResUnsafeValid.delete(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, WmsWarehouseManage wmsWarehouseManage) {
        if (WmsWarehouseManageResUnsafeValid.modify(req, wmsWarehouseManage)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManage);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (WmsWarehouseManageResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return wmsWarehouseManageResAtomic.info_$WmsWarehouseManageUpdateLock(req);
        if (WmsWarehouseManageResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$WmsWarehouseManageUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (WmsWarehouseManageResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        //
        if (WmsWarehouseManageResUnsafeValid.auditSubmit(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        if (WmsWarehouseManageResUnsafeValid.audit(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        if (WmsWarehouseManageResUnsafeValid.auditReject(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        if (WmsWarehouseManageResUnsafeValid.usingEnable(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, WmsWarehouseManageCondition wmsWarehouseManageCondition) {
        if (WmsWarehouseManageResUnsafeValid.usingDisable(req, wmsWarehouseManageCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$WmsWarehouseManageUpdateLock(req, wmsWarehouseManageCondition);
        }
    }

}
